package edu.whu.xterm.http;

import java.util.concurrent.Callable;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpUriRequest;

public class RequestWorker implements Callable<HttpResponse> {

	private HttpClient hClient;

	private HttpUriRequest request;

	public <T> RequestWorker(HttpClient client, HttpUriRequest request) {
		hClient = client;
		this.request = request;
	}

	@Override
	public HttpResponse call() throws Exception {
		return hClient.execute(request);
	}
}
